package com.project.service.impl;

import com.project.bean.PieBean;
import com.project.mapper.IPieMapper;
import com.project.service.IPieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.util.List;

@Service
@Transactional
public class PieServiceImpl implements IPieService {
    @Autowired
    private IPieMapper mapper;
    @Override
    public List<PieBean> getByType(LocalDate startDate, LocalDate endDate) {
        return mapper.getByType(startDate, endDate);
    }

    @Override
    public List<PieBean> getByName(LocalDate startDate, LocalDate endDate) {
        return mapper.getByName(startDate, endDate);
    }
}
